import { observable } from 'mobx';

export const COUNTER_STORE = 'counterStore';

export class CounterStore {
  @observable
  counter = 0;

  increment() {
    this.counter++;
  }
  decrement() {
    this.counter--;
  }
  incrementAsync() {
    setTimeout(() => {
      this.counter++;
    }, 1000);
  }
}
